import os
str = "Hello Python \n 向文件写入数据"
f = open("ex6_8.txt", "w")
f.write(str)
f.close()
